<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use DB;
use App\Http\Requests;
use App\Http\Controllers\Controller;

class DoneController extends Controller
{
    //显示已完成订单页
	public function done(){
		$dones = DB::table('order')->where('ostatus','=',3)->paginate(3);
		return view('admin.order.done',['dones'=>$dones]);
	}
	
	 //删除订单操作
    public function delete(Request $request){
        //接收用户id
        $oid=$request->input('oid');
        //删除操作
        $result=DB::table('order')->where('oid','=',$oid)->delete();

        if($result){
            echo 1;
        }else{
            echo 0;
        }
    }
	
	
	
	
	
	
	
	
	
	
	
	
}
